package com.example.mobile203zlw20216061300427;

import android.os.Bundle;

import androidx.appcompat.app.AppCompatActivity;
import androidx.recyclerview.widget.LinearLayoutManager;
import androidx.recyclerview.widget.RecyclerView;

import java.util.ArrayList;
import java.util.List;

public class MainActivity extends AppCompatActivity {

    private RecyclerView reMainActivtiy;
    private List<MAIN_STOPlset>list=new ArrayList<>();
    @Override
    protected void onCreate(Bundle savedInstanceState) {

        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);
        initView();
        reMainActivtiy = (RecyclerView) findViewById(R.id.re_mainActivtiy);
        LinearLayoutManager linearLayoutManager=new LinearLayoutManager(this);
        reMainActivtiy.setLayoutManager(linearLayoutManager);
        list.add(new MAIN_STOPlset("兴华商场停车场",30,"5元/小时","30公里","更多信息","佛山市高明区富湾镇学府路8号"
        ,R.drawable.pc_1));
        list.add(new MAIN_STOPlset("良缘路停车场",30,"5元/小时","30公里","更多信息","佛山市高明区富湾镇学府路8号"
                ,R.drawable.pc_2));
        list.add(new MAIN_STOPlset("佛山岭南天地(祖庙路)-停车场",30,"5元/小时","30公里","更多信息","佛山市高明区富湾镇学府路8号"
                ,R.drawable.pc_3));
        list.add(new MAIN_STOPlset("保利水城-地下停车场",30,"5元/小时","30公里","更多信息","佛山市高明区富湾镇学府路8号"
                ,R.drawable.pc_4));
        list.add(new MAIN_STOPlset("佛山中海环宇城地下停车场",30,"5元/小时","30公里","更多信息","佛山市高明区富湾镇学府路8号"
                ,R.drawable.pc_5));
        main_Adapter main_adapter=new main_Adapter(list, this);
        reMainActivtiy.setAdapter(main_adapter);
    }

    private void initView() {
        reMainActivtiy = (RecyclerView) findViewById(R.id.re_mainActivtiy);
    }
}